///////////////////////////////////////////////////////////////////////////////
// Project: Hoyo Client Game
//
// hy_language_logic.cpp
// Created: 2013-7-13
// Author: Like Cheng
///////////////////////////////////////////////////////////////////////////////

#ifndef _HY_LANGUAGE_LOGIC_H__
#define _HY_LANGUAGE_LOGIC_H__

#include "hy_includes.h"

// multilanuage support
#define CL( p ) hy_language_logic::instance()->get_content( p )
#define CLS( a ) CL(a).c_str()

class hy_language_logic
{
public:
    hy_language_logic();
	virtual ~hy_language_logic();

	bool						init();
    
	std::string get_content( const char* content );
    
    /** returns a shared instance of the director */
	static hy_language_logic*	instance(void);  
    static void				purge_instance();

private:
    bool			m_is_ready;
    Json::Value		m_root;

	bool read_language_content();
    
};


#endif
